/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

.monaco-workbench .panel.integrated-terminal {
	align-content: flex-start;
	align-items: baseline;
	display: flex;
	flex-direction: column;
	background-color: transparent!important;
	user-select: initial;
	-webkit-user-select: initial;
	position: relative;
}

.monaco-workbench .panel.integrated-terminal .terminal-outer-container {
	height: 100%;
	width: 100%;
	box-sizing: border-box;
	overflow: hidden;
}

.monaco-workbench .panel.integrated-terminal .terminal-tab {
	height: 100%;
}

.monaco-workbench .panel.integrated-terminal .terminal-wrapper {
	display: none;
	margin: 0 10px;
}
.monaco-workbench .panel.integrated-terminal .terminal-wrapper.active {
	display: block;
	position: absolute;
	bottom: 2px; /* Matches padding-bottom on .terminal-outer-container */
	top: 0;
}
.monaco-workbench .panel.integrated-terminal .monaco-split-view2.horizontal .split-view-view:first-child .terminal-wrapper {
	margin-left: 20px;
}
.monaco-workbench .panel.integrated-terminal .monaco-split-view2.horizontal .split-view-view:last-child .terminal-wrapper {
	margin-right: 20px;
}

.monaco-workbench .panel.integrated-terminal .xterm a:not(.xterm-invalid-link) {
	/* To support message box sizing */
	position: relative;
}

.monaco-workbench .panel.integrated-terminal .terminal-wrapper > div {
	height: 100%;
}

.monaco-workbench .panel.integrated-terminal .xterm-viewport {
	margin-right: -10px;
}
.monaco-workbench .panel.integrated-terminal .monaco-split-view2.horizontal .split-view-view:last-child .xterm-viewport {
	margin-right: -20px;
}

.monaco-workbench .panel.integrated-terminal canvas {
	/* Align the viewport and canvases to the bottom of the panel */
	position: absolute;
	right: -20px;
	bottom: 0;
	left: 0;
	/* Disable upstream's style */
	top: auto;
}

.monaco-workbench .panel.integrated-terminal {
	font-variant-ligatures: none;
}

.monaco-workbench .panel.integrated-terminal .split-view-view {
	box-sizing: border-box;
}

/* border-color is set by theme key terminal.border */
.monaco-workbench .panel.integrated-terminal .monaco-split-view2.horizontal .split-view-view:not(:first-child) {
	border-left-width: 1px;
	border-left-style: solid;
}
.monaco-workbench .panel.integrated-terminal .monaco-split-view2.vertical .split-view-view:not(:first-child) {
	border-top-width: 1px;
	border-top-style: solid;
}

.monaco-workbench .panel.integrated-terminal.enable-ligatures {
	font-variant-ligatures: normal;
}


.monaco-workbench .panel.integrated-terminal.disable-bold .xterm-bold {
	font-weight: normal !important;
}

/* Use the default cursor when alt is active to help with clicking to move cursor */
.monaco-workbench .panel.integrated-terminal .terminal-outer-container.alt-active .xterm {
	cursor: default;
}

.monaco-workbench .panel.integrated-terminal .xterm {
	position: absolute;
	bottom: 0;
	left: 0;
	user-select: none;
	-webkit-user-select: none;
}
.monaco-workbench .panel.integrated-terminal .monaco-split-view2.vertical .split-view-view:not(:last-child) .xterm {
	/* When vertical and NOT the bottom terminal, align to the top instead to prevent the output jumping around erratically */
	top: 0;
	bottom: auto;
}

.monaco-workbench .panel.integrated-terminal .xterm:focus {
	/* Hide outline when focus jumps from xterm to the text area */
	outline: none;
}

.hc-black .monaco-workbench .panel.integrated-terminal .xterm.focus::before,
.hc-black .monaco-workbench .panel.integrated-terminal .xterm:focus::before {
	display: block;
	content: "";
	border: 1px solid;
	position: absolute;
	left: -5px;
	top: 0;
	right: -5px;
	bottom: 0;
	z-index: 10;
}

.hc-black .monaco-workbench .panel.integrated-terminal .monaco-split-view2.horizontal .split-view-view:not(:only-child) .xterm.focus::before,
.hc-black .monaco-workbench .panel.integrated-terminal .monaco-split-view2.horizontal .split-view-view:not(:only-child) .xterm:focus::before {
	right: 0;
}

.monaco-workbench .panel.integrated-terminal .xterm .xterm-helpers {
	position: absolute;
	top: 0;
}

.monaco-workbench .panel.integrated-terminal .xterm .xterm-helper-textarea:focus {
	/* Override the general vscode style applies `opacity:1!important` to textareas */
	opacity: 0 !important;
}

.vs-dark .monaco-workbench.mac .panel.integrated-terminal .terminal-outer-container:not(.alt-active) .terminal:not(.enable-mouse-events),
.hc-black .monaco-workbench.mac .panel.integrated-terminal .terminal-outer-container:not(.alt-active) .terminal:not(.enable-mouse-events) {
	cursor: -webkit-image-set(url('') 1x, url('') 2x) 5 8, text;
}

/* Override default xterm style to make !important so it takes precedence over custom mac cursor */
.xterm.xterm-cursor-pointer {
	cursor: pointer!important;
}

.monaco-workbench .quick-open-terminal-configure {
	background-image: url('configure-light.svg');
}

.vs-dark .monaco-workbench .quick-open-terminal-configure {
	background-image: url('configure-dark.svg');
}

.hc-black .monaco-workbench .quick-open-terminal-configure {
	background-image: url('configure-hc.svg');
}
